
module.exports = (sequelize, Sequelize) => {
    return sequelize.define("pure_depts", {
        id: {
            type: Sequelize.INTEGER,
            primaryKey: true,
            autoIncrement: true
        },
        parent_id: {
            type: Sequelize.INTEGER,
            comment: '上级部门ID'
        },
        name: {
            type: Sequelize.STRING(50),
            comment:'部门名称'
        },
        leader:{
            type: Sequelize.STRING(50),
            comment:'部门负责人'  
        },
        phone:{
            type: Sequelize.STRING(50),
            comment:'部门电话'  
        },
        email:{
            type: Sequelize.STRING(50),
            comment:'部门邮箱'  
        },
        sort: {
            type: Sequelize.INTEGER,
            comment:'排序',
        },
        status: {
            type: Sequelize.BOOLEAN,
            defaultValue: 1,
            comment: '状态 0:禁用 1:启用',
        },
        remark: {
            type: Sequelize.STRING(250),
            comment: '备注',
        },
    },{
        comment:'部门表', 
    });
};
